home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / scrapenv.zip / SCRAPENV.DOC < prev    next >
Text File  |  1991-10-02  |  10KB  |  246 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                                                ScrapEnv
  8.                                                                ver 1.00
  9.  
  10.                                   -- A Memory Saving Utility for MS-DOS
  11.  
  12.  
  13.                                                    by Heath I Hunnicutt
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                                  Copyright (C) 1991, Heath I Hunnicutt.
  24.                                                    All Rights Reserved.
  25. -------------------------------------------------------------------------------
  26.                                                                       p2
  27. I. License
  28.  
  29.         This copy of ScrapEnv is provided for evaluation use only.  Use
  30. of ScrapEnv may continue for up to 21 days under this license.  After
  31. this time, you are required to either discontinue use of ScrapEnv or
  32. remit payment to Heath Hunnicutt.  (See last section, Contacting the
  33. Author)
  34.  
  35.         This utility may be copied, transmitted, and otherwise
  36. distributed without limitation, provided that such distribution is done
  37. free of charge to all parties involved.  In addition, the utility must
  38. remain in its entirity, composed of the following files:
  39.         ScrapEnv.Doc - This file
  40.         ScrapEnv.Exe - The program file
  41.         Register.Doc - Information about registration
  42.  
  43. II. Limitation of Warranty
  44.  
  45.         Heath Hunnicutt makes no warranty, express or implied regarding
  46. the use of ScrapEnv, including any warranty of suitability for any
  47. purpose.  Heath Hunnicutt will not be liable for any damages associated
  48. with ScrapEnv, whether they be incidental, consequential, coincidental
  49. or otherwise.  In particular, this manual clearly states that even
  50. normal use of ScrapEnv in some situations can be detrimental.
  51.                                                                       p3
  52.  
  53. III. Introduction
  54.  
  55.         Under the MS-DOS operating system, when a program is loaded, two
  56. memory areas are reserved for it: An environment variable area and a
  57. main program area.  Obviously, the main program area is always crucial
  58. to a program's operation.  However, the environment area, which averages
  59. 256 bytes per program, may not be so critical.  The environment contains
  60. such information as the current PATH to search for files in, etc.,  Some
  61. programs never make any use of this area of memory.
  62.  
  63.         Also under MS-DOS, programs called TSRs have become ubiquitous.
  64. These TSRs load once and remain in memory, either to augment DOS's
  65. system functions, or to return to action when the user presses a
  66. specific key.  These TSRs, like any other programs, have environment
  67. areas associated with them.  However, the environment is generally of no
  68. use to a TSR, as changes in the 'current' environment are not reflected
  69. in the stored environment area of the TSR, i.e., the TSR's environment
  70. is not up-to-date.
  71.  
  72.         Because the environment space of TSRs is mostly wasted, it is
  73. advantageous to be able to minimize or eliminate this use of memory.
  74. ScrapEnv does just that, by freeing the environment area of the most
  75. recently loaded TSR for use as by DOS.
  76.                                                                       p4
  77.  
  78.         Depending on the number of TSRs used on a particular system and
  79. the size of the environment as each loads, ScrapEnv can save you
  80. anywhere from a few hundred to a few thousand bytes of main memory.
  81.  
  82.         Here's an example from the DOS 5.0 "mem /debug" command that
  83. illustrates the mmeory usage of environment blocks:
  84.           Address     Name          Size       Type
  85.           -------     --------     ------     ------
  86.           008150      MOUSE501     0000E0     Environment
  87.           008240      MOUSE501     0032A0     Program
  88.           00B4F0      EGAUTIL      0000F0     Environment
  89.           00B5F0      EGAUTIL      000680     Program
  90.           00BC80      4DOS24H      0000D0     Environment
  91.           00BD60      4DOS24H      000A60     Program
  92.           00C7D0      MEM          0000E0     Environment
  93.           00C8C0      MEM          0135A0     Program
  94.           01FE70      MSDOS        080180     -- Free --
  95.  
  96.           603952 largest executable program size
  97.  
  98.         In the above example, there are three TSRs loaded, each with its
  99. own environment block, wasting a total of 688 bytes of main memory.
  100.  
  101.                                                                      p 5
  102.  
  103.         After using ScrapEnv, the memory usage looks like this:
  104.           Address     Name          Size       Type
  105.           -------     --------     ------     ------
  106.           008150      MEM          0000E0     Environment
  107.           008240      MOUSE501     0032A0     Program
  108.           00B4F0      EGAUTIL      0000F0     Environment
  109.           00B5F0      EGAUTIL      000680     Program
  110.           00BC80      4DOS24H      000A60     Program
  111.           00C6F0      MEM          0135A0     Program
  112.           01FCA0      MSDOS        080350     -- Free --
  113.  
  114.           604416 largest executable program size
  115.  
  116.         Notice that there are now 464 more bytes of main memory
  117. available memory free area.  Also notice that ScrapEnv did not remove
  118. EGAUTIL's environment.  This is due to the fact that EGAUTIL was loaded
  119. into memory by yet another program with yet another environment segment,
  120. and after the load had completed, ScrapEnv could not decide whether or
  121. not EGAUTIL was the only user of the memory area containing its environment.
  122. A future version of ScrapEnv will be able to specifically eradicate
  123. 'lost' environments such as this, and will be available to registered
  124. users of version 1.00 before it will be available to the general public.
  125.  
  126.                                                                       p6
  127.  
  128. IV.  Using ScrapEnv
  129.  
  130.         ScrapEnv is used simply by running it IMMEDIATELY AFTER
  131. installing a TSR.  For example, the following snippet is of the
  132. Autoexec.Bat file that generated the preceding memory maps:
  133.         C:\Driver\Mouse\Mouse501
  134.         scrapenv
  135.         C:\windows\egautl\egautil /i /d:1 /m
  136.         scrapenv
  137.         C:\4DOS\4Dos24h
  138.         scrapenv
  139.  
  140.         ScrapEnv requires DOS version 3.0 or higher, and will emit a
  141. message to taht effect if it is run on a system that is not compatible.
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.                                                                       p7
  152.  
  153. V.  Precautions
  154.  
  155.         Using ScrapEnv may be dangerous.  Some TSRs do use their
  156. environment segments.  These TSRs might need to know where the DOS
  157. command interpereter is located, or what the search path was when they
  158. were loaded, or some other useful bit of environment information.
  159. Although there are better ways for a TSR to find such information than
  160. using its own environment block, if a TSR does rely on the environment,
  161. then using ScrapEnv on it may well cause it to fail miserably.  Such use
  162. may cause the TSR to garble data or worse.
  163.  
  164.         In addition, some very poorly written but popular TSRs actually
  165. overwrite their environment segment with executable code.  Scrapping the
  166. environment of such a TSR could lead to disastrous consequences,
  167. including scrambling info on a hard disk, locking up your system, or
  168. whatever other mayhem you can imagine.
  169.  
  170.         The only surefire way to guarantee that a TSR is compatible with
  171. ScrapEnv is to try it out, and see what happens.  Understand, however,
  172. that in so doing you take upon yourself all risk associated with
  173. potential damage to your data.  It is very advisable for you to have a
  174. complete backup of your hard drive and a print out of your computer's
  175.  
  176.                                                                       p8
  177.  
  178. CMOS setup, if any.
  179.  
  180.         On the brighter side, however, ScrapEnv seems to work well with
  181. the majority of TSRs, particularly newer, more well-written ones.
  182.  
  183.         A finally note:  Some TSRs deliberately remove their own
  184. environment segments, since they 'know' they will not use them.  Running
  185. ScrapEnv on these TSRs is not neccessary, but will not cause any undo
  186. harm, either.  ScrapEnv will simply report that no environment segment
  187. could be found.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.                                                                       p9
  202.  
  203. VI.  Contacting the author and registration.
  204.  
  205. Heath Hunnicutt may be contacted in any of the following ways:
  206.  
  207. internet:  heathh@cco.caltech.edu
  208.            heathh@cobalt.cco.caltech.edu
  209.            hihunn@betwixt.ugcs.caltech.edu
  210.  
  211.  
  212. snail mail:  (Sept-May)         Heath Hunnicutt
  213.                                 Box 328  Huntington College
  214.                                 2303 College Ave
  215.                                 Huntington, IN 46750
  216.                                 (219)  358-3643
  217.  
  218.              (June-Aug)         Heath Hunnicutt
  219.                                 4700 E 900 S
  220.                                 Warren, IN  46792
  221.                                 (219) 375-3395
  222.  
  223.  
  224.  
  225.  
  226.                                                                      p10
  227.  
  228.         Registration for ScrapEnv is $10.00 and includes a registered
  229. copy of ScrapEnv on disk, a printed manual, and one free upgrade to the
  230. next version of ScrapEnv.
  231.  
  232.         In addition, the registered version of ScrapEnv never requires a
  233. keystroke to proceed, and does not expire after a period of time.
  234. (Surprise!  Those of you who think you are going to freeload are
  235. mistaken, just wait till a certain date rolls around, and ScrapEnv
  236. refuses to work.)  Also, the registered version can be instructed to not
  237. display such a lengthy message on start-up.
  238.  
  239.         If you would like to register your current version of ScrapEnv,
  240. but do not want the manual or free upgrades, send $5.00 to the above
  241. address, and you will receive a registered copy, and one notice of
  242. future upgrades.
  243.  
  244.         For your convenience, please use the included register.doc as a
  245. registration form.
  246.